# coding=utf-8
from django.shortcuts import render

# Create your views here.
def marry(man, woman):
    if man.has_married or woman.has_married:
        return

    o = models.Family.create(
        husband=man,
        wife=woman
    )
    return o

def divorce(family):
    family.husband.has_married = False
    family.husband.save()

    family.wife.has_married = False
    family.wife.save()
    return
